"""
A collection of all the exceptions we use

Copyright (c) 2009 Christopher Hesse
http://code.google.com/p/python-expect/
"""

class ExpectException(Exception):
    pass

class FailedToConnect(ExpectException):
    pass
    
class ChannelNotConnected(ExpectException):
    pass
    
class Timeout(ExpectException):
    def __init__(self, message, remaining_channels):
        super(Timeout, self).__init__(message)
        self.channels = remaining_channels
    
class ChannelClosed(ExpectException):
    def __init__(self, message, channel=None):
        super(ChannelClosed, self).__init__(message)
        self.channel = channel